import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function updatePassword(data) {
  return request({
    url: '/sys/user/updatePass',
    method: 'put',
    data
  })
}

export function getUserInfo() {
  return request({
    url: '/sys/profile'
  })
}

export function getQrcodeKey() {
  return request({
    url: '/sys/qrcodeKey',
    method: 'get'
  })
}

export function getQrcodeState(qrcodeKey) {
  return request({
    url: '/sys/qrcodeState',
    method: 'get',
    params: { qrcode_key: qrcodeKey }
  })
}

